//首页的所有后台请求接口
import {
	request
} from '@/utils/request.js';

const API_PREFIX = "/address";

export function saveAddress(data) {
	return request({
		url: `${API_PREFIX}/save`,
		method: 'POST',
		data: data
	})
}

export function queryData(userId) {
	return request({
		url: `${API_PREFIX}/query/${userId}`,
		method: 'GET'
	})
}

export function echo(id) {
	return request({
		url: `${API_PREFIX}/query/echo/${id}`,
		method: 'GET'
	})
}

export function updateAddress(data) {
	return request({
		url: `${API_PREFIX}/update`,
		method: 'POST',
		data: data
	})
}